home *** CD-ROM | disk | FTP | other *** search
/ 64'er 1993 February / 64er_Magazin_93-02_1993_Markt__Technik_de_Side_A.d64 / seq to viza (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  3KB  |  111 lines

  1. 1 poke53280,14:poke53281,6
  2. 2 print"[147][154][211][197][209] to [214]izawrite   name:                "
  3. 3 print"[208]reparing phase                         "
  4. 4 def fnh(x)=int(x/256)
  5. 5 def fnl(x)=x-fnh(x)*256
  6. 6 ifpeek(8021)<>76thensys57812"seq to viza.ass",8,1:poke780,0:sys65493
  7. 7 gosub99
  8. 8 rem
  9. 9 rem       --- optionen ---
  10. 10 rem
  11. 11 rem
  12. 12 rem   code fuer cr im quelltext
  13. 13 rem
  14. 14 poke8069,13
  15. 15 rem
  16. 16 rem   codes der kleinbuchstaben
  17. 17 rem   im quelltext
  18. 18 rem
  19. 19 kc=065 :rem    kleines 'a'
  20. 20 rem
  21. 21 poke8080,kc:poke8084,kc+26:poke8089,kc-1
  22. 22 rem
  23. 23 rem   codes der grossbuchstaben
  24. 24 rem   im quelltext
  25. 25 rem
  26. 26 gc=193 :rem    grosses 'a'
  27. 27 rem
  28. 28 poke8096,gc:poke8100,gc+26:poke8105,gc-65
  29. 29 rem
  30. 30 rem   220 ist der code fuer viza-
  31. 31 rem   write's return
  32. 32 rem   alternativ: 32 (leerstelle)
  33. 33 rem
  34. 34 poke8073,220:rem  code fuer cr
  35. 35 rem
  36. 36 rem gross/kleinschrift umwandlung
  37. 37 rem  bei aktiver for-schleife ent-
  38. 38 rem  faellt die gross/klein an-
  39. 39 rem  passung
  40. 40 rem
  41. 41 remfori=8079to8107:pokei,234:next
  42. 42 rem
  43. 43 print" [212]his program changes any text,saved as"
  44. 44 print" a sequential  file, into  a  [214]izawrite"
  45. 45 print" textfile."
  46. 46 printtab(7)"[146](w)1987 by [202]uergen [215]eiland"
  47. 47 print"[159][197]nter name of [211][197][209]-file:";:gosub90:s$=w$
  48. 48 ifs$=""thenprint"":end
  49. 49 print" [211][197][209]-file: "s$
  50. 50 print"                                        ";
  51. 51 print"[154]"tab(24)s$
  52. 52 w$=s$+",s,r":poke8000,l+4
  53. 53 fori=1tol+4:poke8000+i,asc(mid$(w$,i,1)):nexti
  54. 54 print"[154][201]nsert source disk":poke198,0:wait198,1:geta$
  55. 55 print"[154][204]oading [211][197][209]-file  "
  56. 56 sys8021:gosub99
  57. 57 ea=peek(781)+peek(782)*256:lf=ea-10200
  58. 58 print" [204]ength  :"lf"bytes
  59. 59 [153]"cont(NULL)ow i create the (NULL)izawrite-file"
  60. 60 [140]:a[178]10000
  61. 61 [143] --- defaultvalues ---
  62. 62 [135]w:[139]w[178][171]1[167]66
  63. 63 [139]w[177][178]0[167][151]a,w:a[178]a[170]1:[137]62
  64. 64 [135]wr
  65. 65 [129]i[178]1[164][182](w):[151]a,wr:a[178]a[170]1:[130]i:[137]62
  66. 66 [143] --- fileparameter ---
  67. 67 lt[178]lf[170]7:[151]10002,[165]l(lt):[151]10003,[165]h(lt)
  68. 68 [143] --- cr (13) exchange ---
  69. 69 [151]253,[165]l(ea):[151]254,[165]h(ea)
  70. 70 [158]8024
  71. 71 [143] --- bottom of file ---
  72. 72 [129]i[178]0[164]5:[135]w:[151]ea[170]i,w:[130]i
  73. 73 ea[178]ea[170]i
  74. 74 [153]"contlenlosing phase                           "
  75. 75 [153]"open                                        "
  76. 76 [153]"openvalnter name of (NULL)izafile:"s$;:w$[178]s$:[141]92
  77. 77 [139]s$[178]w$[167]75
  78. 78 [153]"cont"[163]24)[200](w$[170]"                ",16)
  79. 79 lv[178]lt[170]198
  80. 80 [153]" (NULL)izawrite-file: "w$
  81. 81 [153]" (NULL)ength        :"lv"bytes
  82. 82 print"                                        ";
  83. 83 print"[154][201]nsert destination disk":poke198,0:wait198,1:geta$
  84. 84 fori=1tol:w=asc(mid$(w$,i,1)):poke8000+i,w:poke10012+i,w:nexti:poke8000,l
  85. 85 poke253,fnl(ea):poke254,fnh(ea)
  86. 86 print"[154][211]aving [214]izawrite-file                "
  87. 87 sys8027:gosub99
  88. 88 print""tab(6)"[201] have done my work ... bye!"
  89. 89 end
  90. 90 rem input
  91. 91 w$="":l=0
  92. 92 print"[164][159][157]";:poke198,0
  93. 93 geta$:ifa$=""then93
  94. 94 ifa$=chr$(13)thenprint" ":return
  95. 95 ifa$=chr$(20)andl>0thenprint"[157]  [157][157][164][159][157]";:l=l-1:w$=left$(w$,l)
  96. 96 ifa$<" "orl=16ora$=chr$(34)then93
  97. 97 ifa$>"z"anda$<"[193]"goto93
  98. 98 printa$"[164][159][157]";:w$=w$+a$:l=l+1:goto93
  99. 99 rem  floppy
  100. 100 open1,8,15:input#1,a$,b$,c$,d$:close1
  101. 101 ifval(a$)=0thenreturn
  102. 102 print"[154][198]loppy error                    "
  103. 103 print"[159]  "a$", "b$", "c$","d$
  104. 104 print"":end
  105. 105 rem     headerdaten
  106. 106 data 86,87,0,0,3,-8,0,-17,96
  107. 107 data 5,0,32,14,14,72,0,14,1,0,14
  108. 108 data 0,1,0,6,0,14,-18,32,14,254
  109. 109 data 6,-117,32,0,-11,170,0,241,-1
  110. 110 data 241,32,241,32,241,255
  111.